{literal}
<script>
function checkAll()
{
	var total;
	total = document.frmAdmin.total.value;
	var i;
	for(i=1;i<total;i++) {
		id = document.getElementById("chk" + i);
		id.checked = true;
	}
}

function unCheckAll()
{
	var total;
	total = document.frmAdmin.total.value;
	var i;
	for(i=1;i<total;i++) {
		id = document.getElementById("chk" + i);
		id.checked = false;
	}
}
</script>
{/literal}
<!-- Content Area -->
<div id="content"> 
  
  <!-- Component Title -->
  <div class="pagetitle icon-48-module">
    <h2>Manager: SELECT ITEMS</h2>
  </div>
  
  <!-- System Messages -->
  
  <div id="system-message-container"> {if $msg}
    <dl id="system-message">
      <dt class="message">Message</dt>
      <dd class="message message">
        <ul>
          <li>{$msg}</li>
        </ul>
      </dd>
    </dl>
    {/if} </div>
  
  <!-- Sub Menu Navigation -->
  <div class="subheader">
    <h3 class="element-invisible">Sub Menu</h3>
    <div id="no-submenu"></div>
  </div>
  
  <!-- Toolbar Icon Buttons -->
  <div class="actionbar-box">
    <div class="module">
      <h3>Toolbar</h3>
      <div class="actionbar-list">
        
        <div class="clr"></div>
      </div>
    </div>
    <div class="clr"></div>
  </div>
  
  <!-- Beginning of Actual Content -->
  <div id="element-box">
    <p id="skiptargetholder"><a id="skiptarget" class="skip" tabindex="-1"></a></p>
    <form name="frmAdmin" action="{$action}" method="post">
      <fieldset id="filter-bar">
        <legend class="element-invisible">Filter:</legend>
        <div><a href="#" onclick="javascript:checkAll();" >Checkall</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="javascript:unCheckAll();">Uncheckall</a></div>
        <div class="filter-search">
          <label class="filter-search-lbl" for="filter_search">Filter:</label>
            {if $categories}
            	{assign var="counter" value="1"}
                {foreach from=$categories key=k item=v}
                	{assign var="select" value="0"}
                    {if $chk}
                        {foreach from=$chk key=k2 item=v2}
                            {if $v == $v2}
                                {assign var="select" value="1"}
                            {/if}
                        {/foreach}
                    {/if}
                	{if $counter % 2 == 1}
                    	<div class="clr"></div>
                    {/if}
                	<div style="float:left;width:300px"><input type="checkbox" name="chk[]" id="chk{$counter}" value="{$k}" {if $select == 1} checked="checked" {/if} /> {$v}</div>
                    {assign var="counter" value=$counter + 1}
                {/foreach}
            {/if}
            <div class="clr"></div>
            <div class="clr"></div>
          <button type="submit">Select</button>
        </div>
      </fieldset>
      <div class="clr"> </div>
      <input type="hidden" value="" name="task"  />
      <input type="hidden" value="{$counter}" name="total"  />
    </form>
    <div class="clr"></div>
  </div>
  <!-- end of element-box -->
  
  <noscript>
  Warning! JavaScript must be enabled for proper operation of the Administrator backend.
  </noscript>
  <div class="clr"></div>
</div>
<!-- end of content --> 
